package com.yxw.live_vod_boot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxw.live_vod_boot.entity.YxOnDemandVideoEntity;
import com.yxw.live_vod_boot.vo.VideoPalyStatisticsVo;
import com.yxw.live_vod_facade.vo.RecommendVodListVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * @author liuxin
 * @create 2023-11-16 15:23:14
 * @description  点播视频管理
 */
@Repository
public interface OnDemandVideoMapper extends BaseMapper<YxOnDemandVideoEntity> {

    /**
     * 查询推荐视频-已关注用户的视频 三天内最新一条
     * @param userId
     * @return
     */
    List<RecommendVodListVo> getFollowVodList(@Param("userId") Long userId);

    /**
     * 查询热门视频
     * @return
     */
    Set<RecommendVodListVo> getPopularVodList();

    /**
     * 最新视频
     * @return
     */
    Set<RecommendVodListVo> getNewVodList();

    /**
     * 点播作品统计
     * @param videoId
     * @return
     */
    VideoPalyStatisticsVo getVideoPlayStatistics(@Param("videoId") Long videoId);
}
